﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nes.Core
{
    internal class Ram
    {
        private Byte[] ram;
        private Int32 offset;
        public Ram(Int32 size) :this(size,0) { }
        public Ram(Int32 size, Int32 offest) 
        {
            ram = new Byte[size];
            this.offset = offest;
        }
        public Byte Read(Int32 addr) => ram[addr - offset];
        public void Write(Int32 addr, Byte data) => ram[addr - offset] = data;
    }
}
